package com.cusc.module_monitor_location.entry;

import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;

import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者: wangfei
 * 创建时期: 2020/4/29.
 * 包名: com.cusc.module_monitor_location.entry
 * 类名: OSAndroidMvvm
 */
public class NodeBean extends BaseExpandNode {

    private List<BaseNode> childNode;
    private String title;
    protected String id; /*机构部门ID 格式:appSysId_appDeptId*/
    protected int leaf; /*是否有子节点 0:是 1:不是*/
    protected int nodeType;/*节点类型，1:机构 2:部门 3:车辆 4:人员*/


    public static final int STATE_UNCHECKED = 0;//未选
    public static final int STATE_CHECKED = 1;//全选
    public static final int STATE_PART_CHECKED = 2;//部分选择
    protected int uiState = STATE_CHECKED;


    public NodeBean(String title, String id, int leaf, int nodeType) {
        this.childNode = new ArrayList<>();
        this.title = title;
        this.id = id;
        this.leaf = leaf;
        this.nodeType = nodeType;
        setExpanded(false);
    }

    @Nullable
    @Override
    public List<BaseNode> getChildNode() {
        return childNode;
    }

    public void setChildNode(List<BaseNode>  childNode) {
        this.childNode = childNode;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getLeaf() {
        return leaf;
    }

    public void setLeaf(int leaf) {
        this.leaf = leaf;
    }

    public int getNodeType() {
        return nodeType;
    }

    public void setNodeType(int nodeType) {
        this.nodeType = nodeType;
    }

    public int getUiState() {
        return uiState;
    }

    public void setUiState(int uiState) {
        this.uiState = uiState;
    }
}
